]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
notification: Show symbolic icons in a circle and smaller
authorJulian Sparber <julian@sparber.net>
Tue, 19 Dec 2023 15:12:59 +0000 (16:12 +0100)
committerJulian Sparber <julian@sparber.net>
Thu, 1 Feb 2024 09:31:24 +0000 (10:31 +0100)
Huge symbolic icons look bad therefore we special case them, this
obviously can only work for icons that use the system icons.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3066>

data/theme/gnome-shell-sass/widgets/_message-list.scss
js/ui/calendar.js

index 10fa88258767a85bd11485a88aad1103d0e1628e..30fe4ad005c794da7eb9bf1a0182e60fc275c754 100644 (file)
       > StIcon {
         icon-size: $base_icon_size * 3; // 48px
         -st-icon-style: symbolic;
+
+        .message-themed-icon {
+          border-radius: $forced_circular_radius; // is circular
+          background-color: transparentize($fg_color, 0.8);
+          icon-size: $base_icon_size;
+          min-width: $base_icon_size * 3;
+          min-height: $base_icon_size * 3;
+        }
       }
     }
 
index 455cfa1847431074e384922b4fcfdcdd585b6a50..c43290ac7e47643ef32d1c7b3781b70a4fa8b623 100644 (file)
@@ -790,10 +790,11 @@ class NotificationMessage extends MessageList.Message {
     }
 
     _getIcon() {
-        if (this.notification.gicon) {
-            return new St.Icon({
-                gicon: this.notification.gicon,
-            });
+        const {gicon} = this.notification;
+        if (gicon) {
+            const styleClass =
+                gicon instanceof Gio.ThemedIcon ? 'message-themed-icon' : '';
+            return new St.Icon({gicon, styleClass});
         } else {
             return null;
         }